package com.kede.api.ienum;

import lombok.AllArgsConstructor;
import lombok.Getter;

/***
 ** @Author:Pr.li
 ** @Description:
 ** @Date: create in 2023/5/6 14:33
 ***/
@Getter
@AllArgsConstructor
public enum AppIdTypeEnum {
    USERAPP("USERAPP","用户端app","wxbc3097088c6cd8ba","",1),
    USER_XCX("USER_XCX","用户端小程序","wxfe5793144bbb2d8a","046686ee0b9e00f439ff377a0b041bad",1),
    QISHOU_XCX("QISHOU_XCX","骑手端小程序","wxcf703f0a5fc585e0","7e9aa78b87097726350915d8c387fba9",2),
    MENDIAN_XCX("MENDIAN_XCX","门店端小程序","wxe033e647671049f5","18a45045fb55c2f0c79449a79385f15b",3),
    QUDAI_XCX("QUDAI_XCX","区代小程序","wxa45d2089dd5dde49","851b7612e89dc65f2109610bcf8449b4",4),
    SHIDAI_XCX("SHIDAI_XCX","市代小程序","wxac96a0b990763d10","e1886ef220381ae500d137457f2ecd90",5),
    WX_PUBLIC("WX_PUBLIC","上门拉公众号","wxe49e0c6822b917c3","83fcf3bba1f6d8662426c69528eacc2f",6);

    String type;
    String name;
    String appid;
    String appSecret;
    //1用户2骑手3门店4区代理5市代理
    Integer phpType;

    /**
     * 根据type 获取当前枚举
     *
     * @Author: Pr.li
     * @Date: 2023/4/20 11:04
     * @Param: [String]
     * @Return: AppIdTypeEnum
     ***/
    public static AppIdTypeEnum valueOfCode(String type) {
        for (AppIdTypeEnum it : AppIdTypeEnum.values()) {
            if (it.getType().equals(type)) {
                return it;
            }
        }
        return null;
    }
}
